<style>
    
    .mask{
        position: absolute;
        top: 71px;
        right: 0;
        left: 0;
        padding: 10px;
        background: #eee;
        cursor: pointer;
        text-align: center;
        display: none;
        margin-left: 200px;
        margin-bottom: 40px;
    }
</style>
<div class="mask">
    <img src=""/>
</div>
<script>
    // 图片查看
    $("body").on("click",".img", function(){
        var $this = $(this), $mask = $(".mask");
        // 替换src属性
        $mask.children("img").attr("src", $this.data("src"));
        // 显示遮罩层
        $mask.show();
    });
    $(".mask").on("click",function(){
        var $this = $(this);
        // src属性置空
        $this.children("img").attr("src","");
        // 隐藏遮罩层
        $this.hide();
    });
    $(".btn").on("click",function(){
        var $this = $(this), $action = $this.data("action"), $src = $this.data("src"),$confirm = $this.data("confirm");
        var $cause = $(this).parent('td').next('td').children("select").val();
        if ( $confirm && !confirm($confirm) ) {
            return;
        }
        switch ($action){
            case "redirect":
                if ($src){
                    window.location.href = $src + "&cause="+$cause;
                }else {
                    console.log("无src值");
                }
                break;
            default:
                console.log("无操作");
        }
    });
</script>